package com.ozo.cloud.common.base.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.io.Serializable;

/**
 * 分页参数基类
 *
 * @author qiangesoft
 * @date 2024-06-28
 */
@Schema(description = "分页参数基类")
@Data
public class BasePage extends BaseSortable implements Serializable {

    @Schema(description = "当前页数", defaultValue = "1")
    @Range(min = 1, message = "{core.valid.basePager.current.range}")
    protected Integer pageNum = 1;

    @Schema(description = "分页大小", defaultValue = "10")
    @Range(min = 1, max = 2000, message = "{core.valid.basePager.size.range}")
    protected Integer pageSize = 10;

}